#pragma once

template<size_t N>
class Formatter
{
public:
	Formatter(char const* format,...)
	{
		va_list arglist;
		va_start(arglist, format);
		_vsnprintf_s_l(m_buff, N, N-1, format, NULL, arglist);
	}

	Formatter()
	{
		memset(m_buff,0,N);
	}

	void Format(char const* format,...)
	{
		va_list arglist;
		va_start(arglist, format);
		_vsnprintf_s_l(m_buff, N, N-1, format, NULL, arglist);
	}
	operator char const*()
	{
		return m_buff;
	}
private:
// 	Formatter(Formatter const& other);
// 	Formatter& operator=(Formatter const& other);

	char m_buff[N];
};

typedef Formatter<4096> FT;